﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Init : MonoBehaviour {
    //public GameObject line;
    //public GameObject kai_guan1_f;
    //public GameObject pei_dian_xiang_f;
    // Use this for initialization
    //连线始终点
    public static string startPoint = "";
    public static string endPoint = "";
    //相机初始坐标
    public static Vector3 camPos0;
    public static Vector3 camRot0;
    //飞线参数
    public static int isFly = 0;
    public static Vector3 startFly;
    public static Vector3 endFly;
    //原理图闪烁参数
    public static bool isShan = true;
    public static int shanIndex = 0;

    //开关状态
    public static bool sw1_status = false;
    public static bool sw2_status = false;
    public static bool ebox1_sw1_status = false;
    public static bool ebox1_sw2_status = false;
    //元件、连线、原理图网络
    public static string[][] LineMap =  {
       new string[]{"ebox1_p1","sw1_p2","line1","ylt_l1","ebox1","sw1"},
       new string[]{"sw1_p1","sw2_p3","line2","ylt_l2" ,"sw1","sw2"},
       new string[]{"sw1_p3","sw2_p1","line3","ylt_l3","sw1","sw2"},
       new string[]{"sw2_p2","lamp1_p1","line4","ylt_l4" ,"sw2","lamp1"},
       new string[]{"ebox1_p2","lamp1_p2","line5", "ylt_l5","ebox1","lamp1" }
    };

    //模拟考场成绩及错误次数参数
    public static int score = 100;
    public static int errNum = 0;

    void Start () {
        //line = GameObject.Find("line");
        //line.SetActive(false);
        //kai_guan1_f = GameObject.Find("kai_guan1_f");
        //kai_guan1_f.SetActive(false);
        //pei_dian_xiang_f = GameObject.Find("pei_dian_xiang_f");
        //pei_dian_xiang_f.SetActive(false);
        GameObject mainCam = GameObject.Find("Main Camera");
        camPos0 = mainCam.transform.position;
        camRot0 = mainCam.transform.eulerAngles;
    }
	
	// Update is called once per frame
	void Update () {
		
	}
    //重置全局参数
    public static void reset()
    {
        startPoint = "";
        endPoint = "";

        //飞线参数
        isFly = 0;

        //原理图闪烁参数
        isShan = true;
        shanIndex = 0;

          //开关状态
         sw1_status = false;
         sw2_status = false;
         ebox1_sw1_status = false;
         ebox1_sw2_status = false;
         //考试成绩
         score = 100;
         errNum = 0;
    }
}
